package org.atmaca.ert.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.atmaca.ert.model.Feed;
import org.atmaca.ert.service.GuiServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author "huseyin.atmaca"
 * 
 */

@Controller
@RequestMapping("/item/*.do")
public class GuiController {

	@Autowired
	private GuiServiceImpl gui;
	
	@RequestMapping
	public Object list(Model model, HttpServletRequest request){
		
		List<Feed> listFeeds = gui.listFeeds(13);
		
		model.addAttribute("feeds", listFeeds);
		
		return "list";
		
	}
	
	
}
